import {  lazy } from "react";

import { createBrowserRouter } from "react-router-dom";

const Home = lazy(() => import('../pages/Home/index'))
const Index = lazy(() => import('../pages/Index/index'))
const Login = lazy(() => import('../pages/Login/index'))
const App = lazy(() => import('../App'))

export const Zi = [
    {
        path: '/home',
        element: <Home></Home>,
        title: '首页',
        icon: '',
        children: [
            {
                path: '/home/index',
                element: <Index></Index>,
                title: '管理',
                icon: '',
            }
        ]
    }
]

const routes = createBrowserRouter([
    {
        path: '/',
        element: <App></App>,
        children: Zi
    },
    {
        path: '/login',
        element: <Login></Login>
    }
])

export default routes